package com.example.springboot01.propost;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @author keyer
 * @Description : @PostConstruct: 在bean的构造函数执行之后执行；@PreDestroy：在bean销毁前执行
 * Created by cyd on 2021-04-30 17:00:59
 */
public class Jsr250WayService {
    @PostConstruct
    public void init() {
        System.out.println("@jsr250-init-method");
    }

    public Jsr250WayService() {
        super();
        System.out.println("初始化构造函数-Jsr250WayService");
    }

    @PreDestroy
    public void destroy() {
        System.out.println("@jsr250-destroy-method");
    }
}
